export class CustomTimer {
    constructor() {
        this.startTime = null;
    }

    start() {
        if (!this.startTime) this.startTime = performance.now();
    }

    stop() {
        if (this.startTime) {
            const time = performance.now() - this.startTime;
            this.startTime = null;
            return time;
        }
    }
}